<div id="page-wrapper">
    <!-- /.row -->
    <div class="row">
        <div class="col-sm-12">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <span class="judul-page">Master Siswa</span>
                    <span class="pull-right">
                      <a href="<?php echo base_url()?>mr_siswa/add" class="btn btn-warning btn-xs"><span class="glyphicon glyphicon-plus"></span>&nbsp;Tambah Data</a>
                    </span>
                    <div class="clearfix"></div>
                </div>
                <div class="panel-body">
                  <div class="row margin-bottom10">
                    <form class="form-inline" role="form" method="post" action="<?php echo site_url($aksi_cari);?>">
                      <div class="col-md-8">
                        <select name="lembaga"  class="form-control required email">
                          <option value="all"> - - Tampilkan Semua - - </option>
                          <?php
                            if(count($list_lembaga)>0){
                              $i = 1; 
                              foreach ($list_lembaga as $row) {
                                $id_lembaga = $row->id_lembaga;
                                $id_lmbga = $param_lembaga;
                                if($id_lembaga == $id_lmbga){
                                  $s = "selected";
                                }else{
                                  $s = "";
                                }
                                echo "<option value=".$row->id_lembaga." $s>".$row->nama_lembaga."</option>";
                              }
                            }
                          ?>
                        </select>
                      </div>
                      <div class="col-md-4">
                        <div class="input-group input-group-sm">
                          <input type="text" name="judul" value="<?php echo isset($param_judul)?$param_judul:''; ?>" class="form-control required email" placeholder="Pencarian..." title="Masukkan kata kunci">
                          <span class="input-group-btn">
                            <button type="submit" name="cari" class="btn btn-primary"><span class="glyphicon glyphicon-search"></span></button>
                          </span>
                        </div>
                      </div>
                    </form>
                  </div>
                    <div class="table-responsive">
                      <table class="table table-striped table-bordered table-hover">
                        <thead>
                            <tr>
                                <th>No</th>
                                <th>NIS</th>
                                <th>NVA</th>
                                <th>Nama Lengkap</th>
                                <th>JK</th>
                                <th>TTL</th>
                            </tr>
                        </thead>
                        <tbody>
						<?php 
							if(count($list)>0){
								$i = 1+$offset; 
								foreach ($list as $row) {
						?>										
                            <tr>
                                <td><?php echo $i; ?></td>
                                <td><?php echo $row->nva; ?></td> 
                                <td><?php echo $row->nis; ?></td> 
                                <td><?php echo $row->nm_lengkap; ?></td> 
                                <td><?php echo $row->jk; ?></td> 
                                <td><?php echo $row->tmp_lahir.', '.date("d-m-Y", strtotime ($row->tgl_lahir)); ?>
									<span class="pull-right">
										<a href="<?php echo site_url('mr_siswa/edit/'.$row->nis);?>" class="btn btn-success btn-xs" title="Edit"><span class="glyphicon glyphicon-edit"></span></a>
										<a href="<?php echo site_url('mr_siswa/detail/'.$row->nis);?>" class="btn btn-info btn-xs" title="Detail"><span class="glyphicon glyphicon-file"></span></a>
										<a href="<?php echo site_url('mr_siswa/delete/'.$row->nis);?>" onclick="return confirm('Yakin Anda akan menghapus data Siswa ini secara permanen?')" class="btn btn-danger btn-xs" title="Hapus"><span class="glyphicon glyphicon-trash"></span></a>
									</span>
								</td>
                            </tr>
						<?php
						$i++;
								}
							}else{
						?>
							<tr>
                                <td colspan="7"><center>Belum ada data Siswa</center></td>
							</tr>
						<?php
							}
						?>
                        </tbody>
                      </table>
                    </div>
                    <div class="clearfix"></div>
                    <center>
                    <?php
                    echo ! empty($pagination) ? '<center><div class="pagination">' . $pagination . '</div></center>' : '';
                    ?>
                    </center>
                </div>
            </div>
        </div>
    </div>
    <!-- /.row -->
</div>
<!-- /#page-wrapper -->